
export default {
    methods: {
        // 是否需要弹登录确认框
        loginConfirm() {
            if (!this.$store.getters.token) {
                this.$dialog.confirm({
                    title: '温馨提示',
                    message: '请先登录',
                    confirmButtonText: '去登录',
                    cancelButtonText: '再逛逛'
                })
                    .then(() => {
                        // this.$route.fullPath 
                        this.$router.replace({
                            path: '/login',
                            query: {
                                backUrl: this.$route.fullPath
                            }
                        })
                    })
                    .catch(() => { })
                return true
            }
            return false
        }
    }
}